<p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">FileNumber:</span> Any integer expression that defines the file that you want to write to.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Position: </span>For relative files (random access files), the number of the record that you want to write.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>For binary files (binary access), the position of the byte in the file where you want to start writing.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Variable:</span> Name of the variable that you want to write to the file.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>Note for relative files: If the contents of this variable does not match the length of the record that is specified in the <span class="T1">Len</span> <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>clause of the <span class="T1">Open</span> statement, the space between the end of the newly written record and the next record is padded with existing data from the file that you are writing to.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>Note for binary files: The contents of the variables are written to the specified position, and the file pointer is inserted directly after the last byte. No space is left between the records.</p>
<p class="PropText"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Dim iNumber As Integer</p>
<p class="PropText"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>Dim sText As Variant REM Must be a variant type</p>
<p class="PropText"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>Dim aFile As String</p>
<p class="PropText"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Open aFile For Random As #iNumber Len=32</p>
<p class="PropText"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>Seek #iNumber,1 <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM Position to start writing</p>
<p class="PropText"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the first line of text" <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>REM Fill line with text</p>
<p class="PropText"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the second line of text"</p>
<p class="PropText"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,, "This is the third line of text"</p>
<p class="PropText"><help:paragraphinfo state="U" number="32" xmlns:help="http://openoffice.org/2000/help"/>Open aFile For Random As #iNumber Len=32</p>
<p class="PropText"><help:paragraphinfo state="U" number="37" xmlns:help="http://openoffice.org/2000/help"/>Put #iNumber,20,"This is the text in record 20"</p>